package com.evidencer.demo.servlet;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.evidencer.demo.Dao.UserDao;

/**
 * @Title: ServletConfigDemo.java
 * @Package com.evidencer.demo.servlet
 * @Description: TODO
 * @author Sunbeam lyzpoq_gmail_com
 * @date 2014-1-29 下午08:43:01
 * @version V1.0
 */
public class ServletConfigDemo extends HttpServlet {

	/*
	*
	
	Title: doGet
	
	*
	
	Description: 
	
	* @param req
	* @param resp
	* @throws ServletException
	* @throws IOException
	* @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	*/
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
//		InputStream in=this.getServletContext().getResourceAsStream("WEB-INF/classes/db.properties");
//		Properties p=new Properties();
//		p.load(in);
//		String value=p.getProperty("ConnectURL");
//		System.out.println(value);
		
		UserDao uDao=new UserDao();
		uDao.selectUser();
	}

	/*
	*
	
	Title: doPost
	
	*
	
	Description: 
	
	* @param req
	* @param resp
	* @throws ServletException
	* @throws IOException
	* @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	*/
	
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		super.doPost(req, resp);
	}
	
	

}

